﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="Inovout.Cloud.Data.Blob"
				       namespace="Inovout.Cloud.Data.Blob.Models" >

  <class name="Directory" table="Blob_Directory">
    <id name="Id" access="field.camelcase"
        column="DirectoryId" type="Int32">
      <generator class="native" />
    </id>
    <property name="Name" />
    <property name="Owner" />
    <many-to-one name="Parent" column="ParentId" class="Directory" />
    <set name="Children" table="Blob_Directory_Node" inverse="true">
      <key column="DirectoryId" />
      <!--<one-to-many class="Directory" />-->
      <many-to-any id-type="int" meta-type="int">
        <meta-value value="1" class="Directory" />
        <meta-value value="2" class="File" />
        <column name="NodeType" />
        <column name="NodeId" />
      </many-to-any>
    </set>
    <property name="Path" unique="true" />
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>


